package org.baojie.server.handler;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;

public class SignalHandler extends SimpleChannelInboundHandler<byte[]> {

    private static final Logger log = LoggerFactory.getLogger(SignalHandler.class);

    public SignalHandler() {

    }

    @Override
    public void channelRead0(ChannelHandlerContext ctx, byte[] msg) throws Exception {

    }

    @Override
    public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
        ctx.channel().close();
        log.error("管道channel_id:" + ctx.channel().id() + ",中出现异常，出错！！！");
    }

}

